<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/29 0029
 * Time: 11:42
 */

namespace app\admin\validate;


use think\Validate;

class Transaction extends Validate
{
    protected $rule = [
        'data'   =>'',
        'title'    =>'require',
        'price'    =>'require|>:0',
        'num'      =>'require|>:0',
        'type'     =>'in:1,2',
      	'lv'	   =>'require',

    ];

    protected $message = [
        'title.require'   =>  '请选择币种',
        'price.require'   =>  '请输入价格',
        'price.>'         =>  '请输入正确的价格',
        'num.require'     =>  '请输入数量',
        'type.require'    =>  '请选择交易模式',
        'type.in'         =>  '请选择正确的交易模式',
        'lv.require'	  =>  '请输入本次交易收益率',

    ];

    protected $scene = [
        'tranlist'          =>  ['data'],
        'tranpay'           =>  ['ref'],
        'gettrandata'       =>  ['data'],
        'trancurrency'      =>  ['data'],
      	'getclmoeny'		=>  ['data'],
      	'clmoneyreset'		=>  ['data'],
      	'clnumreset'		=>  ['data'],
    ];
}